package com.bowen.paycenter.service.impl;

import com.bowen.paycenter.domain.PayInfo;
import com.bowen.paycenter.mapper.PayInfoMapper;
import com.bowen.paycenter.service.IPayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 支付信息Service业务层处理
 * @author Renbowen
 * @date 2020-11-17
 */
@Service
@Slf4j
public class PayServiceImpl implements IPayService
{
    private final PayInfoMapper payInfoMapper;

    public PayServiceImpl(PayInfoMapper payInfoMapper) {
        this.payInfoMapper = payInfoMapper;
    }


    /**
     * 根据订单号查询支付信息
     * @param orderId 订单号
     * @return PayInfo
     */
    @Override
    public PayInfo queryByOrderId(String orderId) {
        return null;
    }

    @Override
    public int createPayInfo(PayInfo payInfo) {
        return payInfoMapper.insertPayInfo(payInfo);
    }

    @Override
    public int updatePayInfo(PayInfo payInfo) {
        return payInfoMapper.updatePayInfo(payInfo);
    }
}
